from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import Qt

class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(1800, 660)
        self.pushButton = QtWidgets.QPushButton(Form)
        # self.pushButton.setGeometry(QtCore.QRect(1160, 360, 81, 27))
        self.pushButton.setGeometry(QtCore.QRect(535, 360, 81, 27))
        self.pushButton.setObjectName("pushButton")
        self.pushButton_2 = QtWidgets.QPushButton(Form)
        self.pushButton_2.setGeometry(QtCore.QRect(10, 10, 97, 27))
        self.pushButton_2.setObjectName("pushButton_2")
        self.pushButton_3 = QtWidgets.QPushButton(Form)
        self.pushButton_3.setGeometry(QtCore.QRect(10, 40, 97, 27))
        self.pushButton_3.setObjectName("pushButton_3")
        self.pushButton_4 = QtWidgets.QPushButton(Form)
        self.pushButton_4.setGeometry(QtCore.QRect(130, 10, 97, 27))
        self.pushButton_4.setObjectName("pushButton_4")
        self.pushButton_5 = QtWidgets.QPushButton(Form)
        self.pushButton_5.setGeometry(QtCore.QRect(130, 40, 97, 27))
        self.pushButton_5.setObjectName("pushButton_5")
        self.pushButton_6 = QtWidgets.QPushButton(Form)
        self.pushButton_6.setGeometry(QtCore.QRect(250, 10, 97, 27))
        self.pushButton_6.setObjectName("pushButton_6")
        self.pushButton_7 = QtWidgets.QPushButton(Form)
        self.pushButton_7.setGeometry(QtCore.QRect(250, 40, 97, 27))
        self.pushButton_7.setObjectName("pushButton_7")
        self.pushButton_8 = QtWidgets.QPushButton(Form)
        self.pushButton_8.setGeometry(QtCore.QRect(450, 10, 97, 27))
        self.pushButton_8.setObjectName("pushButton_8")
        self.pushButton_9 = QtWidgets.QPushButton(Form)
        self.pushButton_9.setGeometry(QtCore.QRect(450, 40, 97, 27))
        self.pushButton_9.setObjectName("pushButton_9")
        self.pushButton_10 = QtWidgets.QPushButton(Form)
        self.pushButton_10.setGeometry(QtCore.QRect(570, 10, 97, 27))
        self.pushButton_10.setObjectName("pushButton_10")
        self.pushButton_11 = QtWidgets.QPushButton(Form)
        self.pushButton_11.setGeometry(QtCore.QRect(570, 40, 97, 27))
        self.pushButton_11.setObjectName("pushButton_11")
        self.pushButton_12 = QtWidgets.QPushButton(Form)
        self.pushButton_12.setGeometry(QtCore.QRect(690, 10, 97, 27))
        self.pushButton_12.setObjectName("pushButton_12")
        self.pushButton_13 = QtWidgets.QPushButton(Form)
        self.pushButton_13.setGeometry(QtCore.QRect(690, 40, 97, 27))
        self.pushButton_13.setObjectName("pushButton_13")
        self.pushButton_14 = QtWidgets.QPushButton(Form)
        self.pushButton_14.setGeometry(QtCore.QRect(810, 10, 97, 27))
        self.pushButton_14.setObjectName("pushButton_14")
        self.pushButton_15 = QtWidgets.QPushButton(Form)
        self.pushButton_15.setGeometry(QtCore.QRect(810, 40, 97, 27))
        self.pushButton_15.setObjectName("pushButton_15")
        self.pushButton_16 = QtWidgets.QPushButton(Form)
        self.pushButton_16.setGeometry(QtCore.QRect(930, 10, 97, 27))
        self.pushButton_16.setObjectName("pushButton_16")
        self.pushButton_17 = QtWidgets.QPushButton(Form)
        self.pushButton_17.setGeometry(QtCore.QRect(930, 40, 97, 27))
        self.pushButton_17.setObjectName("pushButton_17")
        self.pushButton_18 = QtWidgets.QPushButton(Form)
        self.pushButton_18.setGeometry(QtCore.QRect(1050, 10, 97, 27))
        self.pushButton_18.setObjectName("pushButton_18")
        self.pushButton_19 = QtWidgets.QPushButton(Form)
        self.pushButton_19.setGeometry(QtCore.QRect(1050, 40, 97, 27))
        self.pushButton_19.setObjectName("pushButton_19")
        self.pushButton_20 = QtWidgets.QPushButton(Form)
        self.pushButton_20.setGeometry(QtCore.QRect(1170, 10, 97, 27))
        self.pushButton_20.setObjectName("pushButton_20")
        self.pushButton_21 = QtWidgets.QPushButton(Form)
        self.pushButton_21.setGeometry(QtCore.QRect(1170, 40, 97, 27))
        self.pushButton_21.setObjectName("pushButton_21")
        self.pushButton_22 = QtWidgets.QPushButton(Form)
        self.pushButton_22.setGeometry(QtCore.QRect(1290, 10, 97, 27))
        self.pushButton_22.setObjectName("pushButton_22")
        self.pushButton_23 = QtWidgets.QPushButton(Form)
        self.pushButton_23.setGeometry(QtCore.QRect(1290, 40, 97, 27))
        self.pushButton_23.setObjectName("pushButton_23")
        self.pushButton_24 = QtWidgets.QPushButton(Form)
        self.pushButton_24.setGeometry(QtCore.QRect(1410, 10, 97, 27))
        self.pushButton_24.setObjectName("pushButton_24")
        self.pushButton_25 = QtWidgets.QPushButton(Form)
        self.pushButton_25.setGeometry(QtCore.QRect(1410, 40, 97, 27))
        self.pushButton_25.setObjectName("pushButton_25")
        # self.pushButton_26 = QtWidgets.QPushButton(Form)
        # self.pushButton_26.setGeometry(QtCore.QRect(1530, 10, 97, 27))
        # self.pushButton_26.setObjectName("pushButton_26")
        # self.pushButton_27 = QtWidgets.QPushButton(Form)
        # self.pushButton_27.setGeometry(QtCore.QRect(1530, 40, 97, 27))
        # self.pushButton_27.setObjectName("pushButton_27")


        self.slider_sizeselect = QtWidgets.QSlider(Form)
        self.slider_sizeselect.setRange(10,70)
        self.slider_sizeselect.setOrientation(Qt.Horizontal)
        self.slider_sizeselect.setValue(Form.size)
        self.slider_sizeselect.setGeometry(QtCore.QRect(1530, 70, 97, 27))

        self.label_sizeselect = QtWidgets.QLabel(Form)
        self.label_sizeselect.setText("Brush Size")
        self.label_sizeselect.setGeometry(QtCore.QRect(1630, 70, 97, 27))

        self.slider_yawselect = QtWidgets.QSlider(Form)
        self.slider_yawselect.setRange(-100,100)
        self.slider_yawselect.setOrientation(Qt.Horizontal)
        self.slider_yawselect.setValue(Form.yaw)
        self.slider_yawselect.setGeometry(QtCore.QRect(1530, 10, 97, 27))

        self.label_yawselect = QtWidgets.QLabel(Form)
        self.label_yawselect.setText("Yaw")
        self.label_yawselect.setGeometry(QtCore.QRect(1630, 10, 97, 27))

        self.slider_pitchselect = QtWidgets.QSlider(Form)
        self.slider_pitchselect.setRange(-100,100)
        self.slider_pitchselect.setOrientation(Qt.Horizontal)
        self.slider_pitchselect.setValue(Form.pitch)
        self.slider_pitchselect.setGeometry(QtCore.QRect(1530, 40, 97, 27))

        self.label_pitchselect = QtWidgets.QLabel(Form)
        self.label_pitchselect.setText("Pitch")
        self.label_pitchselect.setGeometry(QtCore.QRect(1630, 40, 97, 27))

        self.text_inputID = QtWidgets.QTextEdit(Form)
        self.text_inputID.setGeometry(QtCore.QRect(10, 70, 40, 27))
        self.text_inputID.setObjectName("text_inputID")

        self.pushButton_inputID = QtWidgets.QPushButton(Form)
        self.pushButton_inputID.setGeometry(QtCore.QRect(60, 70, 60, 27))
        self.pushButton_inputID.setObjectName("pushButton_inputID")

        self.text_seed = QtWidgets.QTextEdit(Form)
        self.text_seed.setGeometry(QtCore.QRect(140, 70, 40, 27))
        self.text_seed.setObjectName("text_seed")
        self.text_seed.setPlainText("0")

        self.label_seed = QtWidgets.QLabel(Form)
        self.label_seed.setText("Seed")
        self.label_seed.setGeometry(QtCore.QRect(190, 70, 97, 27))




        self.graphicsView = QtWidgets.QGraphicsView(Form)
        self.graphicsView.setGeometry(QtCore.QRect(20, 120, 512, 512))
        self.graphicsView.setObjectName("graphicsView")
        self.graphicsView_2 = QtWidgets.QGraphicsView(Form)
        self.graphicsView_2.setGeometry(QtCore.QRect(620, 120, 512, 512))
        self.graphicsView_2.setObjectName("graphicsView_2") 
        self.graphicsView_3 = QtWidgets.QGraphicsView(Form)
        self.graphicsView_3.setGeometry(QtCore.QRect(1260, 120, 512, 512))
        self.graphicsView_3.setObjectName("graphicsView_3")


        self.retranslateUi(Form)
        self.pushButton.clicked.connect(Form.generateAndReconstruct)
        self.pushButton_2.clicked.connect(Form.open)
        self.pushButton_3.clicked.connect(Form.open_mask)
        self.pushButton_4.clicked.connect(Form.clear)
        self.pushButton_5.clicked.connect(Form.undo)
        self.pushButton_6.clicked.connect(Form.save_img)
        self.pushButton_7.clicked.connect(Form.bg_mode)
        self.pushButton_8.clicked.connect(Form.skin_mode)
        self.pushButton_9.clicked.connect(Form.nose_mode)
        self.pushButton_10.clicked.connect(Form.eye_g_mode)
        self.pushButton_11.clicked.connect(Form.l_eye_mode)
        self.pushButton_12.clicked.connect(Form.r_eye_mode)
        self.pushButton_13.clicked.connect(Form.l_brow_mode)
        self.pushButton_14.clicked.connect(Form.r_brow_mode)
        self.pushButton_15.clicked.connect(Form.l_ear_mode)
        self.pushButton_16.clicked.connect(Form.r_ear_mode)
        self.pushButton_17.clicked.connect(Form.mouth_mode)
        self.pushButton_18.clicked.connect(Form.u_lip_mode)
        self.pushButton_19.clicked.connect(Form.l_lip_mode)
        self.pushButton_20.clicked.connect(Form.hair_mode)
        self.pushButton_21.clicked.connect(Form.hat_mode)
        self.pushButton_22.clicked.connect(Form.ear_r_mode)
        self.pushButton_23.clicked.connect(Form.neck_l_mode)
        self.pushButton_24.clicked.connect(Form.neck_mode)
        self.pushButton_25.clicked.connect(Form.cloth_mode)
        # self.pushButton_26.clicked.connect(Form.increase)
        # self.pushButton_27.clicked.connect(Form.decrease)
        

        self.slider_sizeselect.valueChanged.connect(Form.changeBrushSize)
        self.slider_yawselect.valueChanged.connect(Form.changeYaw)
        self.slider_pitchselect.valueChanged.connect(Form.changePitch)

        self.pushButton_inputID.clicked.connect(Form.inputID)

        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        _translate = QtCore.QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "3D-GauGAN"))
        self.pushButton.setText(_translate("Form", "Generate"))
        self.pushButton_2.setText(_translate("Form", "Open Image"))
        self.pushButton_3.setText(_translate("Form", "Open Mask"))
        self.pushButton_4.setText(_translate("Form", "Clear"))
        self.pushButton_5.setText(_translate("Form", "Undo"))
        self.pushButton_6.setText(_translate("Form", "Save Image"))
        self.pushButton_7.setText(_translate("Form", "BackGround"))
        self.pushButton_8.setText(_translate("Form", "Skin"))
        self.pushButton_9.setText(_translate("Form", "Nose"))
        self.pushButton_10.setText(_translate("Form", "Eyeglass"))
        self.pushButton_11.setText(_translate("Form", "Left Eye"))
        self.pushButton_12.setText(_translate("Form", "Right Eye"))
        self.pushButton_13.setText(_translate("Form", "Left Eyebrow"))
        self.pushButton_14.setText(_translate("Form", "Right Eyebrow"))
        self.pushButton_15.setText(_translate("Form", "Left ear"))
        self.pushButton_16.setText(_translate("Form", "Right ear"))
        self.pushButton_17.setText(_translate("Form", "Mouth"))
        self.pushButton_18.setText(_translate("Form", "Upper Lip"))
        self.pushButton_19.setText(_translate("Form", "Lower Lip"))
        self.pushButton_20.setText(_translate("Form", "Hair"))
        self.pushButton_21.setText(_translate("Form", "Hat"))
        self.pushButton_22.setText(_translate("Form", "Earring"))
        self.pushButton_23.setText(_translate("Form", "Necklace"))
        self.pushButton_24.setText(_translate("Form", "Neck"))
        self.pushButton_25.setText(_translate("Form", "Cloth"))
        # self.pushButton_26.setText(_translate("Form", "+"))
        # self.pushButton_27.setText(_translate("Form", "-"))
        self.pushButton_inputID.setText(_translate("Form", "Input ID"))


class Ui_Form_Seg(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(1800, 1260)
        self.pushButton = QtWidgets.QPushButton(Form)
        # self.pushButton.setGeometry(QtCore.QRect(1160, 360, 81, 27))
        self.pushButton.setGeometry(QtCore.QRect(535, 360, 81, 27))
        self.pushButton.setObjectName("pushButton")
        self.pushButton_2 = QtWidgets.QPushButton(Form)
        self.pushButton_2.setGeometry(QtCore.QRect(10, 10, 97, 27))
        self.pushButton_2.setObjectName("pushButton_2")
        self.pushButton_3 = QtWidgets.QPushButton(Form)
        self.pushButton_3.setGeometry(QtCore.QRect(10, 40, 97, 27))
        self.pushButton_3.setObjectName("pushButton_3")
        self.pushButton_4 = QtWidgets.QPushButton(Form)
        self.pushButton_4.setGeometry(QtCore.QRect(130, 10, 97, 27))
        self.pushButton_4.setObjectName("pushButton_4")
        self.pushButton_5 = QtWidgets.QPushButton(Form)
        self.pushButton_5.setGeometry(QtCore.QRect(130, 40, 97, 27))
        self.pushButton_5.setObjectName("pushButton_5")
        self.pushButton_6 = QtWidgets.QPushButton(Form)
        self.pushButton_6.setGeometry(QtCore.QRect(250, 10, 97, 27))
        self.pushButton_6.setObjectName("pushButton_6")
        self.pushButton_7 = QtWidgets.QPushButton(Form)
        self.pushButton_7.setGeometry(QtCore.QRect(250, 40, 97, 27))
        self.pushButton_7.setObjectName("pushButton_7")
        self.pushButton_8 = QtWidgets.QPushButton(Form)
        self.pushButton_8.setGeometry(QtCore.QRect(450, 10, 97, 27))
        self.pushButton_8.setObjectName("pushButton_8")
        self.pushButton_9 = QtWidgets.QPushButton(Form)
        self.pushButton_9.setGeometry(QtCore.QRect(450, 40, 97, 27))
        self.pushButton_9.setObjectName("pushButton_9")
        self.pushButton_10 = QtWidgets.QPushButton(Form)
        self.pushButton_10.setGeometry(QtCore.QRect(570, 10, 97, 27))
        self.pushButton_10.setObjectName("pushButton_10")
        self.pushButton_11 = QtWidgets.QPushButton(Form)
        self.pushButton_11.setGeometry(QtCore.QRect(570, 40, 97, 27))
        self.pushButton_11.setObjectName("pushButton_11")
        self.pushButton_12 = QtWidgets.QPushButton(Form)
        self.pushButton_12.setGeometry(QtCore.QRect(690, 10, 97, 27))
        self.pushButton_12.setObjectName("pushButton_12")
        self.pushButton_13 = QtWidgets.QPushButton(Form)
        self.pushButton_13.setGeometry(QtCore.QRect(690, 40, 97, 27))
        self.pushButton_13.setObjectName("pushButton_13")
        self.pushButton_14 = QtWidgets.QPushButton(Form)
        self.pushButton_14.setGeometry(QtCore.QRect(810, 10, 97, 27))
        self.pushButton_14.setObjectName("pushButton_14")
        self.pushButton_15 = QtWidgets.QPushButton(Form)
        self.pushButton_15.setGeometry(QtCore.QRect(810, 40, 97, 27))
        self.pushButton_15.setObjectName("pushButton_15")
        self.pushButton_16 = QtWidgets.QPushButton(Form)
        self.pushButton_16.setGeometry(QtCore.QRect(930, 10, 97, 27))
        self.pushButton_16.setObjectName("pushButton_16")
        self.pushButton_17 = QtWidgets.QPushButton(Form)
        self.pushButton_17.setGeometry(QtCore.QRect(930, 40, 97, 27))
        self.pushButton_17.setObjectName("pushButton_17")
        self.pushButton_18 = QtWidgets.QPushButton(Form)
        self.pushButton_18.setGeometry(QtCore.QRect(1050, 10, 97, 27))
        self.pushButton_18.setObjectName("pushButton_18")
        self.pushButton_19 = QtWidgets.QPushButton(Form)
        self.pushButton_19.setGeometry(QtCore.QRect(1050, 40, 97, 27))
        self.pushButton_19.setObjectName("pushButton_19")
        self.pushButton_20 = QtWidgets.QPushButton(Form)
        self.pushButton_20.setGeometry(QtCore.QRect(1170, 10, 97, 27))
        self.pushButton_20.setObjectName("pushButton_20")
        self.pushButton_21 = QtWidgets.QPushButton(Form)
        self.pushButton_21.setGeometry(QtCore.QRect(1170, 40, 97, 27))
        self.pushButton_21.setObjectName("pushButton_21")
        self.pushButton_22 = QtWidgets.QPushButton(Form)
        self.pushButton_22.setGeometry(QtCore.QRect(1290, 10, 97, 27))
        self.pushButton_22.setObjectName("pushButton_22")
        self.pushButton_23 = QtWidgets.QPushButton(Form)
        self.pushButton_23.setGeometry(QtCore.QRect(1290, 40, 97, 27))
        self.pushButton_23.setObjectName("pushButton_23")
        self.pushButton_24 = QtWidgets.QPushButton(Form)
        self.pushButton_24.setGeometry(QtCore.QRect(1410, 10, 97, 27))
        self.pushButton_24.setObjectName("pushButton_24")
        self.pushButton_25 = QtWidgets.QPushButton(Form)
        self.pushButton_25.setGeometry(QtCore.QRect(1410, 40, 97, 27))
        self.pushButton_25.setObjectName("pushButton_25")
        # self.pushButton_26 = QtWidgets.QPushButton(Form)
        # self.pushButton_26.setGeometry(QtCore.QRect(1530, 10, 97, 27))
        # self.pushButton_26.setObjectName("pushButton_26")
        # self.pushButton_27 = QtWidgets.QPushButton(Form)
        # self.pushButton_27.setGeometry(QtCore.QRect(1530, 40, 97, 27))
        # self.pushButton_27.setObjectName("pushButton_27")

        self.slider_sizeselect = QtWidgets.QSlider(Form)
        self.slider_sizeselect.setRange(10,70)
        self.slider_sizeselect.setOrientation(Qt.Horizontal)
        self.slider_sizeselect.setValue(Form.size)
        self.slider_sizeselect.setGeometry(QtCore.QRect(1530, 70, 97, 27))

        self.label_sizeselect = QtWidgets.QLabel(Form)
        self.label_sizeselect.setText("Brush Size")
        self.label_sizeselect.setGeometry(QtCore.QRect(1630, 70, 97, 27))

        self.slider_yawselect = QtWidgets.QSlider(Form)
        self.slider_yawselect.setRange(-100,100)
        self.slider_yawselect.setOrientation(Qt.Horizontal)
        self.slider_yawselect.setValue(Form.yaw)
        self.slider_yawselect.setGeometry(QtCore.QRect(1530, 10, 97, 27))

        self.label_yawselect = QtWidgets.QLabel(Form)
        self.label_yawselect.setText("Yaw")
        self.label_yawselect.setGeometry(QtCore.QRect(1630, 10, 97, 27))

        self.slider_pitchselect = QtWidgets.QSlider(Form)
        self.slider_pitchselect.setRange(-100,100)
        self.slider_pitchselect.setOrientation(Qt.Horizontal)
        self.slider_pitchselect.setValue(Form.pitch)
        self.slider_pitchselect.setGeometry(QtCore.QRect(1530, 40, 97, 27))

        self.label_pitchselect = QtWidgets.QLabel(Form)
        self.label_pitchselect.setText("Pitch")
        self.label_pitchselect.setGeometry(QtCore.QRect(1630, 40, 97, 27))

        self.slider_truncation = QtWidgets.QSlider(Form)
        self.slider_truncation.setRange(0,100)
        self.slider_truncation.setOrientation(Qt.Horizontal)
        self.slider_truncation.setValue(Form.truncation)
        self.slider_truncation.setGeometry(QtCore.QRect(1530, 100, 97, 27))

        self.label_truncation = QtWidgets.QLabel(Form)
        self.label_truncation.setText("Truncation")
        self.label_truncation.setGeometry(QtCore.QRect(1630, 100, 97, 27))

        self.text_inputID = QtWidgets.QTextEdit(Form)
        self.text_inputID.setGeometry(QtCore.QRect(10, 70, 40, 27))
        self.text_inputID.setObjectName("text_inputID")

        self.pushButton_inputID = QtWidgets.QPushButton(Form)
        self.pushButton_inputID.setGeometry(QtCore.QRect(60, 70, 60, 27))
        self.pushButton_inputID.setObjectName("pushButton_inputID")

        self.text_seed = QtWidgets.QTextEdit(Form)
        self.text_seed.setGeometry(QtCore.QRect(140, 70, 40, 27))
        self.text_seed.setObjectName("text_seed")
        self.text_seed.setPlainText("0")

        self.label_seed = QtWidgets.QLabel(Form)
        self.label_seed.setText("Seed")
        self.label_seed.setGeometry(QtCore.QRect(190, 70, 97, 27))

        self.pushButton_inverse = QtWidgets.QPushButton(Form)
        self.pushButton_inverse.setGeometry(QtCore.QRect(535, 400, 81, 27))
        self.pushButton_inverse.setObjectName("pushButton_inverse")

        self.pushButton_clear_ws = QtWidgets.QPushButton(Form)
        self.pushButton_clear_ws.setGeometry(QtCore.QRect(535, 430, 81, 27))
        self.pushButton_clear_ws.setObjectName("pushButton_clear_ws")




        self.graphicsView = QtWidgets.QGraphicsView(Form)
        self.graphicsView.setGeometry(QtCore.QRect(20, 120, 512, 512))
        self.graphicsView.setObjectName("graphicsView")
        self.graphicsView_2 = QtWidgets.QGraphicsView(Form)
        self.graphicsView_2.setGeometry(QtCore.QRect(620, 120, 512, 512))
        self.graphicsView_2.setObjectName("graphicsView_2") 
        self.graphicsView_3 = QtWidgets.QGraphicsView(Form)
        self.graphicsView_3.setGeometry(QtCore.QRect(1260, 120, 512, 512))
        self.graphicsView_3.setObjectName("graphicsView_3")

        self.graphicsView_5 = QtWidgets.QGraphicsView(Form)
        self.graphicsView_5.setGeometry(QtCore.QRect(620, 680, 512, 512))
        self.graphicsView_5.setObjectName("graphicsView_5") 
        self.graphicsView_6 = QtWidgets.QGraphicsView(Form)
        self.graphicsView_6.setGeometry(QtCore.QRect(1260, 680, 512, 512))
        self.graphicsView_6.setObjectName("graphicsView_6")


        self.retranslateUi(Form)
        self.pushButton.clicked.connect(Form.generateAndReconstruct)
        self.pushButton_2.clicked.connect(Form.open)
        self.pushButton_3.clicked.connect(Form.open_mask)
        self.pushButton_4.clicked.connect(Form.clear)
        self.pushButton_5.clicked.connect(Form.undo)
        self.pushButton_6.clicked.connect(Form.save_img)
        self.pushButton_7.clicked.connect(Form.bg_mode)
        self.pushButton_8.clicked.connect(Form.skin_mode)
        self.pushButton_9.clicked.connect(Form.nose_mode)
        self.pushButton_10.clicked.connect(Form.eye_g_mode)
        self.pushButton_11.clicked.connect(Form.l_eye_mode)
        self.pushButton_12.clicked.connect(Form.r_eye_mode)
        self.pushButton_13.clicked.connect(Form.l_brow_mode)
        self.pushButton_14.clicked.connect(Form.r_brow_mode)
        self.pushButton_15.clicked.connect(Form.l_ear_mode)
        self.pushButton_16.clicked.connect(Form.r_ear_mode)
        self.pushButton_17.clicked.connect(Form.mouth_mode)
        self.pushButton_18.clicked.connect(Form.u_lip_mode)
        self.pushButton_19.clicked.connect(Form.l_lip_mode)
        self.pushButton_20.clicked.connect(Form.hair_mode)
        self.pushButton_21.clicked.connect(Form.hat_mode)
        self.pushButton_22.clicked.connect(Form.ear_r_mode)
        self.pushButton_23.clicked.connect(Form.neck_l_mode)
        self.pushButton_24.clicked.connect(Form.neck_mode)
        self.pushButton_25.clicked.connect(Form.cloth_mode)
        # self.pushButton_26.clicked.connect(Form.increase)
        # self.pushButton_27.clicked.connect(Form.decrease)

        self.slider_sizeselect.valueChanged.connect(Form.changeBrushSize)
        self.slider_yawselect.valueChanged.connect(Form.changeYaw)
        self.slider_pitchselect.valueChanged.connect(Form.changePitch)
        self.slider_truncation.valueChanged.connect(Form.changeTruncation)

        self.pushButton_inputID.clicked.connect(Form.inputID)

        self.pushButton_inverse.clicked.connect(Form.inverse)
        self.pushButton_clear_ws.clicked.connect(Form.clear_ws)

        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        _translate = QtCore.QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "3D-GauGAN"))
        self.pushButton.setText(_translate("Form", "Generate"))
        self.pushButton_2.setText(_translate("Form", "Open Image"))
        self.pushButton_3.setText(_translate("Form", "Open Mask"))
        self.pushButton_4.setText(_translate("Form", "Clear"))
        self.pushButton_5.setText(_translate("Form", "Undo"))
        self.pushButton_6.setText(_translate("Form", "Save Image"))
        self.pushButton_7.setText(_translate("Form", "BackGround"))
        self.pushButton_8.setText(_translate("Form", "Skin"))
        self.pushButton_9.setText(_translate("Form", "Nose"))
        self.pushButton_10.setText(_translate("Form", "Eyeglass"))
        self.pushButton_11.setText(_translate("Form", "Left Eye"))
        self.pushButton_12.setText(_translate("Form", "Right Eye"))
        self.pushButton_13.setText(_translate("Form", "Left Eyebrow"))
        self.pushButton_14.setText(_translate("Form", "Right Eyebrow"))
        self.pushButton_15.setText(_translate("Form", "Left ear"))
        self.pushButton_16.setText(_translate("Form", "Right ear"))
        self.pushButton_17.setText(_translate("Form", "Mouth"))
        self.pushButton_18.setText(_translate("Form", "Upper Lip"))
        self.pushButton_19.setText(_translate("Form", "Lower Lip"))
        self.pushButton_20.setText(_translate("Form", "Hair"))
        self.pushButton_21.setText(_translate("Form", "Hat"))
        self.pushButton_22.setText(_translate("Form", "Earring"))
        self.pushButton_23.setText(_translate("Form", "Necklace"))
        self.pushButton_24.setText(_translate("Form", "Neck"))
        self.pushButton_25.setText(_translate("Form", "Cloth"))
        # self.pushButton_26.setText(_translate("Form", "+"))
        # self.pushButton_27.setText(_translate("Form", "-"))
        self.pushButton_inputID.setText(_translate("Form", "Input ID"))
        self.pushButton_inverse.setText(_translate("Form", "Inverse"))
        self.pushButton_clear_ws.setText(_translate("Form", "Clear ws"))


class Ui_Form_Video(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(1800, 1260)
        self.pushButton = QtWidgets.QPushButton(Form)
        # self.pushButton.setGeometry(QtCore.QRect(1160, 360, 81, 27))
        self.pushButton.setGeometry(QtCore.QRect(535, 360, 81, 27))
        self.pushButton.setObjectName("pushButton")
        self.pushButton_2 = QtWidgets.QPushButton(Form)
        self.pushButton_2.setGeometry(QtCore.QRect(10, 10, 97, 27))
        self.pushButton_2.setObjectName("pushButton_2")
        self.pushButton_3 = QtWidgets.QPushButton(Form)
        self.pushButton_3.setGeometry(QtCore.QRect(10, 40, 97, 27))
        self.pushButton_3.setObjectName("pushButton_3")
        self.pushButton_4 = QtWidgets.QPushButton(Form)
        self.pushButton_4.setGeometry(QtCore.QRect(130, 10, 97, 27))
        self.pushButton_4.setObjectName("pushButton_4")
        self.pushButton_5 = QtWidgets.QPushButton(Form)
        self.pushButton_5.setGeometry(QtCore.QRect(130, 40, 97, 27))
        self.pushButton_5.setObjectName("pushButton_5")
        self.pushButton_6 = QtWidgets.QPushButton(Form)
        self.pushButton_6.setGeometry(QtCore.QRect(250, 10, 97, 27))
        self.pushButton_6.setObjectName("pushButton_6")
        self.pushButton_7 = QtWidgets.QPushButton(Form)
        self.pushButton_7.setGeometry(QtCore.QRect(250, 40, 97, 27))
        self.pushButton_7.setObjectName("pushButton_7")
        self.pushButton_8 = QtWidgets.QPushButton(Form)
        self.pushButton_8.setGeometry(QtCore.QRect(450, 10, 97, 27))
        self.pushButton_8.setObjectName("pushButton_8")
        self.pushButton_9 = QtWidgets.QPushButton(Form)
        self.pushButton_9.setGeometry(QtCore.QRect(450, 40, 97, 27))
        self.pushButton_9.setObjectName("pushButton_9")
        self.pushButton_10 = QtWidgets.QPushButton(Form)
        self.pushButton_10.setGeometry(QtCore.QRect(570, 10, 97, 27))
        self.pushButton_10.setObjectName("pushButton_10")
        self.pushButton_11 = QtWidgets.QPushButton(Form)
        self.pushButton_11.setGeometry(QtCore.QRect(570, 40, 97, 27))
        self.pushButton_11.setObjectName("pushButton_11")
        self.pushButton_12 = QtWidgets.QPushButton(Form)
        self.pushButton_12.setGeometry(QtCore.QRect(690, 10, 97, 27))
        self.pushButton_12.setObjectName("pushButton_12")
        self.pushButton_13 = QtWidgets.QPushButton(Form)
        self.pushButton_13.setGeometry(QtCore.QRect(690, 40, 97, 27))
        self.pushButton_13.setObjectName("pushButton_13")
        self.pushButton_14 = QtWidgets.QPushButton(Form)
        self.pushButton_14.setGeometry(QtCore.QRect(810, 10, 97, 27))
        self.pushButton_14.setObjectName("pushButton_14")
        self.pushButton_15 = QtWidgets.QPushButton(Form)
        self.pushButton_15.setGeometry(QtCore.QRect(810, 40, 97, 27))
        self.pushButton_15.setObjectName("pushButton_15")
        self.pushButton_16 = QtWidgets.QPushButton(Form)
        self.pushButton_16.setGeometry(QtCore.QRect(930, 10, 97, 27))
        self.pushButton_16.setObjectName("pushButton_16")
        self.pushButton_17 = QtWidgets.QPushButton(Form)
        self.pushButton_17.setGeometry(QtCore.QRect(930, 40, 97, 27))
        self.pushButton_17.setObjectName("pushButton_17")
        self.pushButton_18 = QtWidgets.QPushButton(Form)
        self.pushButton_18.setGeometry(QtCore.QRect(1050, 10, 97, 27))
        self.pushButton_18.setObjectName("pushButton_18")
        self.pushButton_19 = QtWidgets.QPushButton(Form)
        self.pushButton_19.setGeometry(QtCore.QRect(1050, 40, 97, 27))
        self.pushButton_19.setObjectName("pushButton_19")
        self.pushButton_20 = QtWidgets.QPushButton(Form)
        self.pushButton_20.setGeometry(QtCore.QRect(1170, 10, 97, 27))
        self.pushButton_20.setObjectName("pushButton_20")
        self.pushButton_21 = QtWidgets.QPushButton(Form)
        self.pushButton_21.setGeometry(QtCore.QRect(1170, 40, 97, 27))
        self.pushButton_21.setObjectName("pushButton_21")
        self.pushButton_22 = QtWidgets.QPushButton(Form)
        self.pushButton_22.setGeometry(QtCore.QRect(1290, 10, 97, 27))
        self.pushButton_22.setObjectName("pushButton_22")
        self.pushButton_23 = QtWidgets.QPushButton(Form)
        self.pushButton_23.setGeometry(QtCore.QRect(1290, 40, 97, 27))
        self.pushButton_23.setObjectName("pushButton_23")
        self.pushButton_24 = QtWidgets.QPushButton(Form)
        self.pushButton_24.setGeometry(QtCore.QRect(1410, 10, 97, 27))
        self.pushButton_24.setObjectName("pushButton_24")
        self.pushButton_25 = QtWidgets.QPushButton(Form)
        self.pushButton_25.setGeometry(QtCore.QRect(1410, 40, 97, 27))
        self.pushButton_25.setObjectName("pushButton_25")
        # self.pushButton_26 = QtWidgets.QPushButton(Form)
        # self.pushButton_26.setGeometry(QtCore.QRect(1530, 10, 97, 27))
        # self.pushButton_26.setObjectName("pushButton_26")
        # self.pushButton_27 = QtWidgets.QPushButton(Form)
        # self.pushButton_27.setGeometry(QtCore.QRect(1530, 40, 97, 27))
        # self.pushButton_27.setObjectName("pushButton_27")

        self.slider_sizeselect = QtWidgets.QSlider(Form)
        self.slider_sizeselect.setRange(10,70)
        self.slider_sizeselect.setOrientation(Qt.Horizontal)
        self.slider_sizeselect.setValue(Form.size)
        self.slider_sizeselect.setGeometry(QtCore.QRect(1530, 70, 97, 27))

        self.label_sizeselect = QtWidgets.QLabel(Form)
        self.label_sizeselect.setText("Brush Size")
        self.label_sizeselect.setGeometry(QtCore.QRect(1630, 70, 97, 27))

        self.slider_yawselect = QtWidgets.QSlider(Form)
        self.slider_yawselect.setRange(-100,100)
        self.slider_yawselect.setOrientation(Qt.Horizontal)
        self.slider_yawselect.setValue(Form.yaw)
        self.slider_yawselect.setGeometry(QtCore.QRect(1530, 10, 97, 27))

        self.label_yawselect = QtWidgets.QLabel(Form)
        self.label_yawselect.setText("Yaw")
        self.label_yawselect.setGeometry(QtCore.QRect(1630, 10, 97, 27))

        self.slider_pitchselect = QtWidgets.QSlider(Form)
        self.slider_pitchselect.setRange(-100,100)
        self.slider_pitchselect.setOrientation(Qt.Horizontal)
        self.slider_pitchselect.setValue(Form.pitch)
        self.slider_pitchselect.setGeometry(QtCore.QRect(1530, 40, 97, 27))

        self.label_pitchselect = QtWidgets.QLabel(Form)
        self.label_pitchselect.setText("Pitch")
        self.label_pitchselect.setGeometry(QtCore.QRect(1630, 40, 97, 27))

        self.slider_truncation = QtWidgets.QSlider(Form)
        self.slider_truncation.setRange(0,100)
        self.slider_truncation.setOrientation(Qt.Horizontal)
        self.slider_truncation.setValue(Form.truncation)
        self.slider_truncation.setGeometry(QtCore.QRect(1530, 100, 97, 27))

        self.label_truncation = QtWidgets.QLabel(Form)
        self.label_truncation.setText("Truncation")
        self.label_truncation.setGeometry(QtCore.QRect(1630, 100, 97, 27))

        self.text_inputID = QtWidgets.QTextEdit(Form)
        self.text_inputID.setGeometry(QtCore.QRect(10, 70, 40, 27))
        self.text_inputID.setObjectName("text_inputID")

        self.pushButton_inputID = QtWidgets.QPushButton(Form)
        self.pushButton_inputID.setGeometry(QtCore.QRect(60, 70, 60, 27))
        self.pushButton_inputID.setObjectName("pushButton_inputID")

        self.text_seed = QtWidgets.QTextEdit(Form)
        self.text_seed.setGeometry(QtCore.QRect(140, 70, 40, 27))
        self.text_seed.setObjectName("text_seed")
        self.text_seed.setPlainText("0")

        self.label_seed = QtWidgets.QLabel(Form)
        self.label_seed.setText("Seed")
        self.label_seed.setGeometry(QtCore.QRect(190, 70, 97, 27))

        # self.pushButton_inverse = QtWidgets.QPushButton(Form)
        # self.pushButton_inverse.setGeometry(QtCore.QRect(535, 400, 81, 27))
        # self.pushButton_inverse.setObjectName("pushButton_inverse")

        # self.pushButton_clear_ws = QtWidgets.QPushButton(Form)
        # self.pushButton_clear_ws.setGeometry(QtCore.QRect(535, 430, 81, 27))
        # self.pushButton_clear_ws.setObjectName("pushButton_clear_ws")
        self.pushButton_get = QtWidgets.QPushButton(Form)
        self.pushButton_get.setGeometry(QtCore.QRect(1500, 680 + 512 + 10, 81, 27))
        self.pushButton_get.setObjectName("pushButton_get")




        self.graphicsView = QtWidgets.QGraphicsView(Form)
        self.graphicsView.setGeometry(QtCore.QRect(20, 120, 512, 512))
        self.graphicsView.setObjectName("graphicsView")
        self.graphicsView_2 = QtWidgets.QGraphicsView(Form)
        self.graphicsView_2.setGeometry(QtCore.QRect(620, 120, 512, 512))
        self.graphicsView_2.setObjectName("graphicsView_2") 
        self.graphicsView_3 = QtWidgets.QGraphicsView(Form)
        self.graphicsView_3.setGeometry(QtCore.QRect(1260, 120, 512, 512))
        self.graphicsView_3.setObjectName("graphicsView_3")

        self.graphicsView_5 = QtWidgets.QGraphicsView(Form)
        self.graphicsView_5.setGeometry(QtCore.QRect(620, 680, 512, 512))
        self.graphicsView_5.setObjectName("graphicsView_5") 
        self.graphicsView_6 = QtWidgets.QGraphicsView(Form)
        self.graphicsView_6.setGeometry(QtCore.QRect(1260, 680, 512, 512))
        self.graphicsView_6.setObjectName("graphicsView_6")


        self.retranslateUi(Form)
        self.pushButton.clicked.connect(Form.generateAndReconstruct)
        self.pushButton_2.clicked.connect(Form.open)
        self.pushButton_3.clicked.connect(Form.open_mask)
        self.pushButton_4.clicked.connect(Form.clear)
        self.pushButton_5.clicked.connect(Form.undo)
        self.pushButton_6.clicked.connect(Form.save_img)
        self.pushButton_7.clicked.connect(Form.bg_mode)
        self.pushButton_8.clicked.connect(Form.skin_mode)
        self.pushButton_9.clicked.connect(Form.nose_mode)
        self.pushButton_10.clicked.connect(Form.eye_g_mode)
        self.pushButton_11.clicked.connect(Form.l_eye_mode)
        self.pushButton_12.clicked.connect(Form.r_eye_mode)
        self.pushButton_13.clicked.connect(Form.l_brow_mode)
        self.pushButton_14.clicked.connect(Form.r_brow_mode)
        self.pushButton_15.clicked.connect(Form.l_ear_mode)
        self.pushButton_16.clicked.connect(Form.r_ear_mode)
        self.pushButton_17.clicked.connect(Form.mouth_mode)
        self.pushButton_18.clicked.connect(Form.u_lip_mode)
        self.pushButton_19.clicked.connect(Form.l_lip_mode)
        self.pushButton_20.clicked.connect(Form.hair_mode)
        self.pushButton_21.clicked.connect(Form.hat_mode)
        self.pushButton_22.clicked.connect(Form.ear_r_mode)
        self.pushButton_23.clicked.connect(Form.neck_l_mode)
        self.pushButton_24.clicked.connect(Form.neck_mode)
        self.pushButton_25.clicked.connect(Form.cloth_mode)
        # self.pushButton_26.clicked.connect(Form.increase)
        # self.pushButton_27.clicked.connect(Form.decrease)

        self.slider_sizeselect.valueChanged.connect(Form.changeBrushSize)
        self.slider_yawselect.valueChanged.connect(Form.changeYaw)
        self.slider_pitchselect.valueChanged.connect(Form.changePitch)
        self.slider_truncation.valueChanged.connect(Form.changeTruncation)

        self.pushButton_inputID.clicked.connect(Form.inputID)

        # self.pushButton_inverse.clicked.connect(Form.inverse)
        # self.pushButton_clear_ws.clicked.connect(Form.clear_ws)
        self.pushButton_get.clicked.connect(Form.get_mask)

        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        _translate = QtCore.QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "3D-aware Conditional Image Synthesis"))
        self.pushButton.setText(_translate("Form", "Generate"))
        self.pushButton_2.setText(_translate("Form", "Open Image"))
        self.pushButton_3.setText(_translate("Form", "Open Mask"))
        self.pushButton_4.setText(_translate("Form", "Clear"))
        self.pushButton_5.setText(_translate("Form", "Undo"))
        self.pushButton_6.setText(_translate("Form", "Save Image"))
        self.pushButton_7.setText(_translate("Form", "BackGround"))
        self.pushButton_8.setText(_translate("Form", "Skin"))
        self.pushButton_9.setText(_translate("Form", "Nose"))
        self.pushButton_10.setText(_translate("Form", "Eyeglass"))
        self.pushButton_11.setText(_translate("Form", "Left Eye"))
        self.pushButton_12.setText(_translate("Form", "Right Eye"))
        self.pushButton_13.setText(_translate("Form", "Left Eyebrow"))
        self.pushButton_14.setText(_translate("Form", "Right Eyebrow"))
        self.pushButton_15.setText(_translate("Form", "Left ear"))
        self.pushButton_16.setText(_translate("Form", "Right ear"))
        self.pushButton_17.setText(_translate("Form", "Mouth"))
        self.pushButton_18.setText(_translate("Form", "Upper Lip"))
        self.pushButton_19.setText(_translate("Form", "Lower Lip"))
        self.pushButton_20.setText(_translate("Form", "Hair"))
        self.pushButton_21.setText(_translate("Form", "Hat"))
        self.pushButton_22.setText(_translate("Form", "Earring"))
        self.pushButton_23.setText(_translate("Form", "Necklace"))
        self.pushButton_24.setText(_translate("Form", "Neck"))
        self.pushButton_25.setText(_translate("Form", "Cloth"))
        # self.pushButton_26.setText(_translate("Form", "+"))
        # self.pushButton_27.setText(_translate("Form", "-"))
        self.pushButton_inputID.setText(_translate("Form", "Input ID"))
        # self.pushButton_inverse.setText(_translate("Form", "Inverse"))
        # self.pushButton_clear_ws.setText(_translate("Form", "Clear ws"))
        self.pushButton_get.setText(_translate("Form", "Get"))


class Ui_Form_Edge2car(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(1800, 1260)
        self.pushButton = QtWidgets.QPushButton(Form)
        # self.pushButton.setGeometry(QtCore.QRect(1160, 360, 81, 27))
        self.pushButton.setGeometry(QtCore.QRect(535, 360, 81, 27))
        self.pushButton.setObjectName("pushButton")
        self.pushButton_2 = QtWidgets.QPushButton(Form)
        self.pushButton_2.setGeometry(QtCore.QRect(10, 10, 97, 27))
        self.pushButton_2.setObjectName("pushButton_2")
        self.pushButton_3 = QtWidgets.QPushButton(Form)
        self.pushButton_3.setGeometry(QtCore.QRect(10, 40, 97, 27))
        self.pushButton_3.setObjectName("pushButton_3")
        self.pushButton_4 = QtWidgets.QPushButton(Form)
        self.pushButton_4.setGeometry(QtCore.QRect(130, 10, 97, 27))
        self.pushButton_4.setObjectName("pushButton_4")
        self.pushButton_5 = QtWidgets.QPushButton(Form)
        self.pushButton_5.setGeometry(QtCore.QRect(130, 40, 97, 27))
        self.pushButton_5.setObjectName("pushButton_5")
        self.pushButton_6 = QtWidgets.QPushButton(Form)
        self.pushButton_6.setGeometry(QtCore.QRect(250, 10, 97, 27))
        self.pushButton_6.setObjectName("pushButton_6")
        self.pushButton_7 = QtWidgets.QPushButton(Form)
        self.pushButton_7.setGeometry(QtCore.QRect(250, 40, 97, 27))
        self.pushButton_7.setObjectName("pushButton_7")
        self.pushButton_8 = QtWidgets.QPushButton(Form)
        self.pushButton_8.setGeometry(QtCore.QRect(450, 10, 97, 27))
        self.pushButton_8.setObjectName("pushButton_8")
        self.pushButton_9 = QtWidgets.QPushButton(Form)
        self.pushButton_9.setGeometry(QtCore.QRect(450, 40, 97, 27))
        self.pushButton_9.setObjectName("pushButton_9")
        self.pushButton_10 = QtWidgets.QPushButton(Form)
        self.pushButton_10.setGeometry(QtCore.QRect(570, 10, 97, 27))
        self.pushButton_10.setObjectName("pushButton_10")
        self.pushButton_11 = QtWidgets.QPushButton(Form)
        self.pushButton_11.setGeometry(QtCore.QRect(570, 40, 97, 27))
        self.pushButton_11.setObjectName("pushButton_11")
        self.pushButton_12 = QtWidgets.QPushButton(Form)
        self.pushButton_12.setGeometry(QtCore.QRect(690, 10, 97, 27))
        self.pushButton_12.setObjectName("pushButton_12")
        self.pushButton_13 = QtWidgets.QPushButton(Form)
        self.pushButton_13.setGeometry(QtCore.QRect(690, 40, 97, 27))
        self.pushButton_13.setObjectName("pushButton_13")
        self.pushButton_14 = QtWidgets.QPushButton(Form)
        self.pushButton_14.setGeometry(QtCore.QRect(810, 10, 97, 27))
        self.pushButton_14.setObjectName("pushButton_14")
        self.pushButton_15 = QtWidgets.QPushButton(Form)
        self.pushButton_15.setGeometry(QtCore.QRect(810, 40, 97, 27))
        self.pushButton_15.setObjectName("pushButton_15")
        self.pushButton_16 = QtWidgets.QPushButton(Form)
        self.pushButton_16.setGeometry(QtCore.QRect(930, 10, 97, 27))
        self.pushButton_16.setObjectName("pushButton_16")
        self.pushButton_17 = QtWidgets.QPushButton(Form)
        self.pushButton_17.setGeometry(QtCore.QRect(930, 40, 97, 27))
        self.pushButton_17.setObjectName("pushButton_17")
        self.pushButton_18 = QtWidgets.QPushButton(Form)
        self.pushButton_18.setGeometry(QtCore.QRect(1050, 10, 97, 27))
        self.pushButton_18.setObjectName("pushButton_18")
        self.pushButton_19 = QtWidgets.QPushButton(Form)
        self.pushButton_19.setGeometry(QtCore.QRect(1050, 40, 97, 27))
        self.pushButton_19.setObjectName("pushButton_19")
        self.pushButton_20 = QtWidgets.QPushButton(Form)
        self.pushButton_20.setGeometry(QtCore.QRect(1170, 10, 97, 27))
        self.pushButton_20.setObjectName("pushButton_20")
        self.pushButton_21 = QtWidgets.QPushButton(Form)
        self.pushButton_21.setGeometry(QtCore.QRect(1170, 40, 97, 27))
        self.pushButton_21.setObjectName("pushButton_21")
        self.pushButton_22 = QtWidgets.QPushButton(Form)
        self.pushButton_22.setGeometry(QtCore.QRect(1290, 10, 97, 27))
        self.pushButton_22.setObjectName("pushButton_22")
        self.pushButton_23 = QtWidgets.QPushButton(Form)
        self.pushButton_23.setGeometry(QtCore.QRect(1290, 40, 97, 27))
        self.pushButton_23.setObjectName("pushButton_23")
        self.pushButton_24 = QtWidgets.QPushButton(Form)
        self.pushButton_24.setGeometry(QtCore.QRect(1410, 10, 97, 27))
        self.pushButton_24.setObjectName("pushButton_24")
        self.pushButton_25 = QtWidgets.QPushButton(Form)
        self.pushButton_25.setGeometry(QtCore.QRect(1410, 40, 97, 27))
        self.pushButton_25.setObjectName("pushButton_25")
        # self.pushButton_26 = QtWidgets.QPushButton(Form)
        # self.pushButton_26.setGeometry(QtCore.QRect(1530, 10, 97, 27))
        # self.pushButton_26.setObjectName("pushButton_26")
        # self.pushButton_27 = QtWidgets.QPushButton(Form)
        # self.pushButton_27.setGeometry(QtCore.QRect(1530, 40, 97, 27))
        # self.pushButton_27.setObjectName("pushButton_27")

        self.slider_sizeselect = QtWidgets.QSlider(Form)
        self.slider_sizeselect.setRange(10,70)
        self.slider_sizeselect.setOrientation(Qt.Horizontal)
        self.slider_sizeselect.setValue(Form.size)
        self.slider_sizeselect.setGeometry(QtCore.QRect(1530, 70, 97, 27))

        self.label_sizeselect = QtWidgets.QLabel(Form)
        self.label_sizeselect.setText("Brush Size")
        self.label_sizeselect.setGeometry(QtCore.QRect(1630, 70, 97, 27))

        self.slider_yawselect = QtWidgets.QSlider(Form)
        self.slider_yawselect.setRange(-100,100)
        self.slider_yawselect.setOrientation(Qt.Horizontal)
        self.slider_yawselect.setValue(Form.yaw)
        self.slider_yawselect.setGeometry(QtCore.QRect(1530, 10, 97, 27))

        self.label_yawselect = QtWidgets.QLabel(Form)
        self.label_yawselect.setText("Yaw")
        self.label_yawselect.setGeometry(QtCore.QRect(1630, 10, 97, 27))

        self.slider_pitchselect = QtWidgets.QSlider(Form)
        self.slider_pitchselect.setRange(-100,100)
        self.slider_pitchselect.setOrientation(Qt.Horizontal)
        self.slider_pitchselect.setValue(Form.pitch)
        self.slider_pitchselect.setGeometry(QtCore.QRect(1530, 40, 97, 27))

        self.label_pitchselect = QtWidgets.QLabel(Form)
        self.label_pitchselect.setText("Pitch")
        self.label_pitchselect.setGeometry(QtCore.QRect(1630, 40, 97, 27))

        self.slider_truncation = QtWidgets.QSlider(Form)
        self.slider_truncation.setRange(0,100)
        self.slider_truncation.setOrientation(Qt.Horizontal)
        self.slider_truncation.setValue(Form.truncation)
        self.slider_truncation.setGeometry(QtCore.QRect(1530, 100, 97, 27))

        self.label_truncation = QtWidgets.QLabel(Form)
        self.label_truncation.setText("Truncation")
        self.label_truncation.setGeometry(QtCore.QRect(1630, 100, 97, 27))

        self.text_inputID = QtWidgets.QTextEdit(Form)
        self.text_inputID.setGeometry(QtCore.QRect(10, 70, 40, 27))
        self.text_inputID.setObjectName("text_inputID")

        self.pushButton_inputID = QtWidgets.QPushButton(Form)
        self.pushButton_inputID.setGeometry(QtCore.QRect(60, 70, 60, 27))
        self.pushButton_inputID.setObjectName("pushButton_inputID")

        self.text_seed = QtWidgets.QTextEdit(Form)
        self.text_seed.setGeometry(QtCore.QRect(140, 70, 40, 27))
        self.text_seed.setObjectName("text_seed")
        self.text_seed.setPlainText("0")

        self.label_seed = QtWidgets.QLabel(Form)
        self.label_seed.setText("Seed")
        self.label_seed.setGeometry(QtCore.QRect(190, 70, 97, 27))

        # self.pushButton_inverse = QtWidgets.QPushButton(Form)
        # self.pushButton_inverse.setGeometry(QtCore.QRect(535, 400, 81, 27))
        # self.pushButton_inverse.setObjectName("pushButton_inverse")

        # self.pushButton_clear_ws = QtWidgets.QPushButton(Form)
        # self.pushButton_clear_ws.setGeometry(QtCore.QRect(535, 430, 81, 27))
        # self.pushButton_clear_ws.setObjectName("pushButton_clear_ws")
        self.pushButton_get = QtWidgets.QPushButton(Form)
        self.pushButton_get.setGeometry(QtCore.QRect(1500, 680 + 512 + 10, 81, 27))
        self.pushButton_get.setObjectName("pushButton_get")




        self.graphicsView = QtWidgets.QGraphicsView(Form)
        self.graphicsView.setGeometry(QtCore.QRect(20, 120, 512, 512))
        self.graphicsView.setObjectName("graphicsView")
        self.graphicsView_2 = QtWidgets.QGraphicsView(Form)
        self.graphicsView_2.setGeometry(QtCore.QRect(620, 120, 512, 512))
        self.graphicsView_2.setObjectName("graphicsView_2") 
        self.graphicsView_3 = QtWidgets.QGraphicsView(Form)
        self.graphicsView_3.setGeometry(QtCore.QRect(1260, 120, 512, 512))
        self.graphicsView_3.setObjectName("graphicsView_3")

        self.graphicsView_5 = QtWidgets.QGraphicsView(Form)
        self.graphicsView_5.setGeometry(QtCore.QRect(620, 680, 512, 512))
        self.graphicsView_5.setObjectName("graphicsView_5") 
        self.graphicsView_6 = QtWidgets.QGraphicsView(Form)
        self.graphicsView_6.setGeometry(QtCore.QRect(1260, 680, 512, 512))
        self.graphicsView_6.setObjectName("graphicsView_6")


        self.retranslateUi(Form)
        self.pushButton.clicked.connect(Form.generateAndReconstruct)
        self.pushButton_2.clicked.connect(Form.open)
        self.pushButton_3.clicked.connect(Form.open_mask)
        self.pushButton_4.clicked.connect(Form.clear)
        self.pushButton_5.clicked.connect(Form.undo)
        self.pushButton_6.clicked.connect(Form.save_img)
        self.pushButton_7.clicked.connect(Form.bg_mode)
        self.pushButton_8.clicked.connect(Form.skin_mode)
        self.pushButton_9.clicked.connect(Form.nose_mode)
        self.pushButton_10.clicked.connect(Form.eye_g_mode)
        self.pushButton_11.clicked.connect(Form.l_eye_mode)
        self.pushButton_12.clicked.connect(Form.r_eye_mode)
        self.pushButton_13.clicked.connect(Form.l_brow_mode)
        self.pushButton_14.clicked.connect(Form.r_brow_mode)
        self.pushButton_15.clicked.connect(Form.l_ear_mode)
        self.pushButton_16.clicked.connect(Form.r_ear_mode)
        self.pushButton_17.clicked.connect(Form.mouth_mode)
        self.pushButton_18.clicked.connect(Form.u_lip_mode)
        self.pushButton_19.clicked.connect(Form.l_lip_mode)
        self.pushButton_20.clicked.connect(Form.hair_mode)
        self.pushButton_21.clicked.connect(Form.hat_mode)
        self.pushButton_22.clicked.connect(Form.ear_r_mode)
        self.pushButton_23.clicked.connect(Form.neck_l_mode)
        self.pushButton_24.clicked.connect(Form.neck_mode)
        self.pushButton_25.clicked.connect(Form.cloth_mode)
        # self.pushButton_26.clicked.connect(Form.increase)
        # self.pushButton_27.clicked.connect(Form.decrease)

        self.slider_sizeselect.valueChanged.connect(Form.changeBrushSize)
        self.slider_yawselect.valueChanged.connect(Form.changeYaw)
        self.slider_pitchselect.valueChanged.connect(Form.changePitch)
        self.slider_truncation.valueChanged.connect(Form.changeTruncation)

        self.pushButton_inputID.clicked.connect(Form.inputID)

        # self.pushButton_inverse.clicked.connect(Form.inverse)
        # self.pushButton_clear_ws.clicked.connect(Form.clear_ws)
        self.pushButton_get.clicked.connect(Form.get_mask)

        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        _translate = QtCore.QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "3D-aware Conditional Image Synthesis (Edge2car)"))
        self.pushButton.setText(_translate("Form", "Generate"))
        self.pushButton_2.setText(_translate("Form", "Open Image"))
        self.pushButton_3.setText(_translate("Form", "Open Mask"))
        self.pushButton_4.setText(_translate("Form", "Clear"))
        self.pushButton_5.setText(_translate("Form", "Undo"))
        self.pushButton_6.setText(_translate("Form", "Save Image"))
        self.pushButton_7.setText(_translate("Form", "BackGround"))
        self.pushButton_8.setText(_translate("Form", "Skin"))
        self.pushButton_9.setText(_translate("Form", "Nose"))
        self.pushButton_10.setText(_translate("Form", "Eyeglass"))
        self.pushButton_11.setText(_translate("Form", "Left Eye"))
        self.pushButton_12.setText(_translate("Form", "Right Eye"))
        self.pushButton_13.setText(_translate("Form", "Left Eyebrow"))
        self.pushButton_14.setText(_translate("Form", "Right Eyebrow"))
        self.pushButton_15.setText(_translate("Form", "Left ear"))
        self.pushButton_16.setText(_translate("Form", "Right ear"))
        self.pushButton_17.setText(_translate("Form", "Mouth"))
        self.pushButton_18.setText(_translate("Form", "Upper Lip"))
        self.pushButton_19.setText(_translate("Form", "Lower Lip"))
        self.pushButton_20.setText(_translate("Form", "Hair"))
        self.pushButton_21.setText(_translate("Form", "Hat"))
        self.pushButton_22.setText(_translate("Form", "Earring"))
        self.pushButton_23.setText(_translate("Form", "Necklace"))
        self.pushButton_24.setText(_translate("Form", "Neck"))
        self.pushButton_25.setText(_translate("Form", "Cloth"))
        # self.pushButton_26.setText(_translate("Form", "+"))
        # self.pushButton_27.setText(_translate("Form", "-"))
        self.pushButton_inputID.setText(_translate("Form", "Input ID"))
        # self.pushButton_inverse.setText(_translate("Form", "Inverse"))
        # self.pushButton_clear_ws.setText(_translate("Form", "Clear ws"))
        self.pushButton_get.setText(_translate("Form", "Get"))

if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    Form = QtWidgets.QWidget()
    ui = Ui_Form()
    ui.setupUi(Form)
    Form.show()
    sys.exit(app.exec_())

